<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%-- <%
	String paths = request.getContextPath();
	String basePaths = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ paths + "/";
	%> --%>
<div class="panel panel-info">
				<table>
				</table>
				<div class="panel-heading">
					<h3 class="panel-title">附件管理</h3>
				</div>
				<div class="panel-body">
					<%-- 	<input type="hidden" name="id" value="${id }">
						<input type="hidden" name="ownerType" value="cert">
						<input type="hidden" name="ownerId" value="3"> --%>
						
						<div class="row fileupload-buttonbar">
							<div class="col-lg-7">
								<span class="btn btn-success fileinput-button btn-sm"> 
									<i class="glyphicon glyphicon-plus"></i> 
									<span  onclick="$('#file_Up').click();">选择文件...(可多选)2</span> 
									<input id="file_Up" type="file" name="file_Up" multiple onchange="getFileSize(this.value)" style="display: none;">
								</span>
							</div>
							<!--  -->
							<table role="presentation" class="table table-striped table-bordered table-hover table-condensed ">
								<tbody class="files" id="tbody">
									<c:forEach items="${filestorage }" var="item">
									<tr class='template-upload fade in'>
			     	      				<td>
			     	      					<c:if test="${item.type==1 || item.type==4 }"><img height='150' width='150' src='<%=contextPath%>/static/upload/${item.flieName }'/></c:if>
			     	      					<c:if test="${item.type==2 }">视频文件</c:if>
			     	      					<c:if test="${item.type==3 }">其他文件</c:if>
			     	      				</td>
			     	      				<td><p class='name'><a target="_blank" href="<%=contextPath%>/static/upload/${item.flieName }" >${item.flieName }</a></p>
			     	      				<strong class='error text-danger label label-danger'></strong></td>
			     	      				<td><p class='size'>${item.flieSize } kb</td>
			     	      				<c:if test="${item.type==4 }"><td><p class='shuom'>封面图</td></c:if>
			     	      				<c:if test="${item.type==3 }"><td><p class='shuom'>其他文件</td></c:if>
			     	      				<c:if test="${item.type==2 }"><td><p class='shuom'>视频文件</td></c:if>
			     	      				<c:if test="${item.type==1 }"><td><p class='shuom'>产品图片</td></c:if>
			     	      				<td><strong class='error text-danger label label-danger' style='color: white;cursor:pointer;' onclick='filedelete(${item.flieId},${id },${attributetype })'>删除</strong></td>
			     	      			</tr>
			     	      			</c:forEach>
	                        	</tbody>
	                        <tbody  class="files" id="tbodyt"></tbody>
						</table>
						</div>
				</div>
			</div>
